package com.zhongfl.crm.enums.boss;

import com.zhongfl.crm.exception.EnumParseException;
import lombok.Getter;

/**
 * OrderMemorandumAtNoticeSendStatusEnum 备忘录订单@通知消息发送状态枚举
 *
 * @author tiantian
 * @date 2018/6/29 14:53
 */
@Getter
public enum OrderMemorandumAtNoticeSendStatusEnum {
    UN_SEND(0,"未发送"),

    PROCESSING_SEND(1,"发送中"),

    FAIL_SEND(2,"发送失败"),

    SUCCESS_SEND(3,"发送成功");

    private int key;
    private String desc;

    OrderMemorandumAtNoticeSendStatusEnum(int key, String desc) {
        this.key=key;
        this.desc = desc;
    }

    public static OrderMemorandumAtNoticeSendStatusEnum valueOf(int key) {
        for (OrderMemorandumAtNoticeSendStatusEnum statusEnum : OrderMemorandumAtNoticeSendStatusEnum.values()) {
            if (statusEnum.getKey() == key) {
                return statusEnum;
            }
        }
        throw new EnumParseException(OrderMemorandumAtNoticeSendStatusEnum.class, String.valueOf(key));
    }
}
